﻿(function() {
    var buildPath = "../../build/";
    requirejs.config({
      baseUrl: "app",
      paths: {
        text: buildPath + "require/text",
        durandal: buildPath + "durandal/js",
        plugins: buildPath + "durandal/js/plugins",
        transitions: buildPath + "durandal/js/transitions",
        knockout: buildPath + "knockout/knockout-3.5.0.debug",
        bootstrap: buildPath + "bootstrap/js/bootstrap",
        jquery: buildPath + "jquery/jquery-3.4.1",
        components: "components"
      },
      shim: {
        bootstrap: {
          deps: ["jquery"], //依赖jquery
          exports: "jQuery" //bootstrap是扩展了jQuery的方法，仍然用的全局变量是Window.jQuery
        }
      }
    });
  })();

define(['durandal/system', 'durandal/app', 'durandal/viewLocator'],  function (system, app, viewLocator) {
    //>>excludeStart("build", true);
    system.debug(true);
    //>>excludeEnd("build");

    app.title = 'Durandal Samples';

    //specify which plugins to install and their configuration
    app.configurePlugins({
        router:true,
        dialog: true,
        widget: {
            kinds: ['expander']
        }
    });

    app.start().then(function () {
        viewLocator.useConvention();
        app.setRoot('shell');
    });
});